-
-
Notifications
You must be signed in to change notification settings - Fork 14.1k
Rewrite String::replace_range
#149447
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Rewrite String::replace_range
#149447
Conversation
|
rustbot has assigned @Mark-Simulacrum. Use |
library/alloctests/tests/string.rs
Outdated
|
|
||
| #[test] | ||
| #[should_panic] | ||
| #[should_panic = "range start index 18446744073709551615 out of range for slice of length 3"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure if these tests are gated, but generally usize::MAX depends on the pointer width of the platform, so we shouldn't hard code it
|
r=me with comment fixed @bors try jobs=i686-gnu-* |
This comment has been minimized.
This comment has been minimized.
Rewrite `String::replace_range` try-job: i686-gnu-*
This comment has been minimized.
This comment has been minimized.
|
💔 Test for f4bd5be failed: CI. Failed jobs:
|
This simplifies the code, provides better panic messages, and avoids an integer overflow.
6ee39cc to
5f5286b
Compare
|
@bors r=Mark-Simulacrum |
|
@theemathas: 🔑 Insufficient privileges: Not in reviewers |
|
@rustbot ready |
This simplifies the code, provides better panic messages, and avoids an integer overflow.